package com.itheima;

import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
import com.baomidou.mybatisplus.generator.config.PackageConfig;
import com.baomidou.mybatisplus.generator.config.StrategyConfig;

public class Generator {
    public static void main(String[] args) {
        AutoGenerator autoGenerator = new AutoGenerator();
        //数据源
        DataSourceConfig dataSource = new DataSourceConfig();
        dataSource.setDriverName("com.mysql.cj.jdbc.Driver");
        dataSource.setUrl("jdbc:mysql://localhost:3306/mybatis?serverTimezone=UTC");
        dataSource.setUsername("root");
        dataSource.setPassword("1234");
        //设置全局配置
        GlobalConfig globalConfig = new GlobalConfig();


//        包相关配置
        PackageConfig packageConfig = new PackageConfig();

        //策略配置
        StrategyConfig strategyConfig= new StrategyConfig();


        autoGenerator.setDataSource(dataSource);
        autoGenerator.execute();
    }
}
